import request from '@/utils/request'

// 创建角色
export const createRole = (data) => {
  return request({
    url: '/api/v1/role/create',
    method: 'post',
    data
  })
}

// 更新角色
export const updateRole = (data) => {
  return request({
    url: '/api/v1/role/update',
    method: 'post',
    data
  })
}

// 删除角色
export const deleteRole = (params) => {
  return request({
    url: '/api/v1/role/delete',
    method: 'get',
    params
  })
}

// 查询单个角色
export const findOneRole = (params) => {
  return request({
    url: '/api/v1/role/findOne',
    method: 'get',
    params
  })
}

// 查询所有角色
export const findAllRole = (params) => {
  return request({
    url: '/api/v1/role/findAll',
    method: 'get',
    params
  })
}

